﻿using SqlSugar;
using System.ComponentModel.DataAnnotations;

namespace Qy.Scenario;
[SugarTable(DbTableName.CmsAppLink)]
public class AppLink
{
    [SugarColumn(IsPrimaryKey = true)]
    public int Id { get; set; }
    public int Cid { get; set; }
    public string Name { get; set; }
    public string Url { get; set; }
    public string Ico { get; set; }
    public string Img { get; set; }
    public int Sort { get; set; }
    public bool Status { get; set; }
}

public class EditAppLink
{
    public int Id { get; set; }
    [Display(Name = "分类ID")]
    public int Cid { get; set; }
    [Display(Name = "名称")]
    [Required(ErrorMessage = "请填链接名称")]
    public string Name { get; set; }
    [Display(Name = "链接")]
    public string Url { get; set; }
    [Display(Name = "图标")]
    public string Ico { get; set; }
    [Display(Name = "图片")]
    public string Img { get; set; }
    [Display(Name = "排序")]
    public int Sort { get; set; }
    [Display(Name = "启用状态")]
    public bool Status { get; set; }
}

public class ViewAppLink
{
    public int Id { get; set; }
    public int Cid { get; set; }
    public string Name { get; set; }
    public string CateName { get; set; }
    public string Url { get; set; }
    public string Ico { get; set; }
    public string Img { get; set; }
    public int Sort { get; set; }
    public bool Status { get; set; }

}

public class QueryAppLink : PagerInfo
{
    public int Id { get; set; } = 0;
    public int Cid { get; set; } = 0;
    public bool Status { get; set; }
    public string Name { get; set; }

}

